package com.xukang.batch.processor;

import com.xukang.batch.po.Users;
import org.springframework.batch.item.ItemProcessor;

/**
 * @description:
 * @author: xukang
 * @create: 2025-06-20
 */
public class MyItemProcessor implements ItemProcessor<Users, Users> {

    @Override
    public Users process(Users users) {
        System.out.println("process");
        if (users.getAge() < 0) {
            throw new IllegalArgumentException("年龄不能为负数: " + users);
        }
        return users;
    }
}